﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

using System;
using ScrumTable.BL.DM.DataManagement;
using ScrumTable.Common.Monitoring;

#endregion

namespace ScrumTable.UI.ViewModel.Controller
{

    public enum SaveState
    {
        Completed,
        Cancel,
        Quit
    }
    /// <summary>
    /// Description of the enum
    /// </summary>
    public interface IRunTaskWithGuiSupplie
    {
        #region Methods
        /// <summary>
        /// Runs a task with a loading bar
        /// </summary>
        /// <param name="action">a action.</param>
        /// <returns></returns>
        IDisposable RunTaskLoadingBar(Action<IDisposable, IDataImportMonitor> action);

        /// <summary>
        /// Runs the saving with gui supplie
        /// </summary>
        /// <param name="action"> call after the saving operation</param>
        /// <returns></returns>
        void RunSave(Action<SaveState> action);

        /// <summary>
        /// Changes the user with gui supplie
        /// </summary>
        /// <param name="action">callback after the saving operation</param>
        /// <param name="changeTo">change to this user</param>
        void ChangeUser(Action<SaveState> action, Member changeTo);
        #endregion
    }
}
